<template>
    <nav>
        <router-link to="/charts" class="item" active-class="selected">
            <Icon name="charts"/>
            统计
        </router-link>
        <router-link to="/tally" class="item" active-class="selected">
            <Icon name="tally"/>
            记一笔
        </router-link>
        <router-link to="/details" class="item" active-class="selected">
            <Icon name="details"/>
            明细
        </router-link>
    </nav>
</template>

<script lang="ts">
    export default {
        name: 'Nav'
    };
</script>

<style lang="scss" scoped>
    @import "~@/assets/style/helper.scss";
    nav {
        display: flex;
        flex-direction: row;
        box-shadow: 0 0 6px rgba(0,0,0,0.3);
        font-size: 12px;
        padding-top: 5px;
        padding-bottom: 5px;
        > .item {
            width: 33.33333%;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            --color-1: $color-gray;
            --color-2: $color-gray;
            color: $color-gray;
            .icon{
                width: 32px;
                height: 32px;
            }
        }
        > .item.selected {
            @extend %svg-theme-color;
            color: $color-orange;
        }
    }
</style>